package com.trust.entity.DTO;

import com.trust.agri.sign.validate.SaveValidate;
import com.trust.agri.sign.validate.UpdateValidate;
import com.trust.entity.VO.DictionaryVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @author ccc
 * @desc
 * @since 2023/11/15 10:35
 */
@Data
@ApiModel("育苗dto")
public class FarmSeedDTO {

    @ApiModelProperty("id")
    @Null(message = "id 只能为空", groups = {SaveValidate.class})
    @NotNull(message = "id 不能为空", groups = {UpdateValidate.class})
    private Integer id;

   /* @ApiModelProperty("作物当前进度")
    @NotNull(message = "作物当前进度 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private BigDecimal cropProgress;

    @ApiModelProperty("作物生长周期")
    @NotNull(message = "作物生长周期 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private BigDecimal growthCycle;*/

    @ApiModelProperty("种子数量")
    @NotNull(message = "种子数量 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private BigDecimal breedNum;

    @ApiModelProperty("种植标识")
    private String plantSign;

    @ApiModelProperty("育苗面积")
    @NotNull(message = "种植面积 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private BigDecimal plantArea;

    @ApiModelProperty("育苗地块")
    @NotEmpty(message = "育苗地块 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private List<Integer> landId;

    @ApiModelProperty(value = "育苗地块编号", allowEmptyValue = true)
    private List<String> landCode;

    @ApiModelProperty("育苗批号")
    @NotBlank(message = "育苗批号 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String code;

    @ApiModelProperty("育苗开始时间")
    @NotNull(message = "育苗开始时间 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Date plantStart;

    @ApiModelProperty("育苗品类")
    @NotNull(message = "育苗品类 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer categoryId;

    @ApiModelProperty(value = "育苗品类名称", allowEmptyValue = true)
    private String categoryName;

    @ApiModelProperty("负责人")
    @NotNull(message = "负责人 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer principal;

    @ApiModelProperty("繁殖材料")
    @NotNull(message ="繁殖材料 不能为空",groups = {SaveValidate.class, UpdateValidate.class})
    private Integer materials;

/*    @ApiModelProperty("记录人")
    @NotBlank(message = "记录人 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String recoder;*/

    @ApiModelProperty("辅助育苗设施")
    private List<DictionaryVO> seedFacilityList;

/*    @ApiModelProperty(value = "辅助育苗设施", allowEmptyValue = true)
    private Integer seedFacilityId;

    @ApiModelProperty(value = "辅助育苗设施名称")
    private String seedFacilityName;*/

    @ApiModelProperty("育苗数量")
    @NotNull(message = "育苗数量 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer seedNum;

    @ApiModelProperty(value = "种源信息")
    @NotNull(message = "种源信息 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer breedId;

    @ApiModelProperty(value = "种源信息名称", allowEmptyValue = true)
    private String breedName;

    @ApiModelProperty("种源批号")
//    @NotNull(message = "种源批号 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer breedCode;

    @ApiModelProperty(value = "种源批号名称", allowEmptyValue = true)
    private String breedCodeName;

  /*  @ApiModelProperty("在茬作物")
    @NotBlank(message = "在茬作物 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String stubbleCrop;*/

/*    @ApiModelProperty("作业描述")
    @NotBlank(message = "作业描述 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String workDetail;*/

/*    @ApiModelProperty("作业班组")
    @NotNull(message = "作业班组 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer workGroupId;

    @ApiModelProperty(value = "作业班组名称", allowEmptyValue = true)
    private String workGroupName;*/

    @ApiModelProperty(value = "作业图片", allowEmptyValue = true)
    private String workPic;

/*    @ApiModelProperty("作业时间-开始 ")
    @NotNull(message = "作业时间-开始 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Date workStart;

    @ApiModelProperty("作业时间-结束")
    @NotNull(message = "作业时间-结束 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Date workEnd;*/

/*    @ApiModelProperty("用工人数")
    @NotNull(message = "用工人数 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private Integer workerNum;*/

/*    @ApiModelProperty(value = "作业耗材", allowEmptyValue = true)
    private List<FarmSeedConsumable> consumableList;*/

/*    @ApiModelProperty(value = "状态 1进行中，2已结束", allowEmptyValue = true)
    private Integer state;*/

    @ApiModelProperty(value = "育苗方式", allowEmptyValue = true)
    private Integer type;

    @ApiModelProperty(value = "育苗方式名称", allowEmptyValue = true)
    @NotBlank(message = "育苗方式 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String typeName;

    @ApiModelProperty("地块标识颜色")
    @NotBlank(message = "地块标识颜色 不能为空", groups = {SaveValidate.class, UpdateValidate.class})
    private String color;
}
